package com.zzyl.service.impl;


import com.zzyl.dto.NursingPlanDto;
import com.zzyl.dto.NursingProjectPlanDto;
import com.zzyl.entity.NursingPlan;
import com.zzyl.mapper.NursingPlanMapper;
import com.zzyl.service.NursingPlanService;
import com.zzyl.vo.NursingPlanVo;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NursingPlanServiceImpl implements NursingPlanService {
   @Autowired
   NursingPlanMapper nursingPlanMapper;


    @Override
    public List<NursingPlanVo> selectAll() {
        return  nursingPlanMapper.selectAll();

    }

    @Override
    public void insert(NursingPlanDto nursingPlanDto) {

        //存入护理计划表
        NursingPlan nursingPlan = new NursingPlan();
        BeanUtils.copyProperties(nursingPlanDto,nursingPlan);
        nursingPlanMapper.insertPlan(nursingPlan);

        //存入护理计划项目关联表

    }
}
